#include "Object.h"

static unsigned char mem_pull[OBJECT_MEM_PULL_SIZE];
static void         *pointer  = &mem_pull[0];
static uint8_t       pre_size = 0;

void *
_object_new(const uint8_t size)
{
        pointer += pre_size;
        pre_size = size;
        return pointer;
}

uint16_t
object_get_used(void)
{
        return (uint16_t)((uint32_t)pointer + pre_size -
                          (uint32_t)&mem_pull[0]);
}
